#include "stdafx.h"
#include "WorkThreadProc.h"
#include "boost/thread.hpp"
#include "boost/function.hpp"
#include <windows.h>

using namespace boost;


CWorkThreadProc::CWorkThreadProc()
{
}


CWorkThreadProc::~CWorkThreadProc()
{
}

void CWorkThreadProc::Start()
{
	function0<void> func = bind(&CWorkThreadProc::Listen, this);
	thread tCtrl(func);
}

void CWorkThreadProc::Listen()
{
	for (int i = 0; i < 3; i++)
	{
		cout << "Work Thread listening...." << endl;
		Sleep(5000);
	}
}